#include "ebasapp.h"
#include <QtGui/QApplication>

#include <Windows.h>
#include <winerror.h>
#include <WinCred.h>
#include <stdio.h>

#include "LogonDlg.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

/*
    CREDUI_INFO * pUiInfo = NULL;
    DWORD dwAuthError = NO_ERROR;
    ULONG pulAuthPackage;
    LPCVOID pvInAuthBuffer = new char[256];
    ULONG ulInAuthBufferSize = 256;
    LPVOID ppvOutAuthBuffer;
    ULONG pulOutAuthBufferSize;
    BOOL pfSave = 1;
    DWORD dwFlags = 0x1000; //CREDUIWIN_SECURE_PROMPT;

    DWORD dw =  CredUIPromptForWindowsCredentials(pUiInfo,
                                                  0,
                                                  &pulAuthPackage,
                                                  pvInAuthBuffer,
                                                  ulInAuthBufferSize,
                                                  &ppvOutAuthBuffer,
                                                  &pulOutAuthBufferSize,
                                                  &pfSave,
                                                  dwFlags);
*/

    LogonDlg l;
    int r = l.exec();

    if (QDialog::Accepted == r) {
      EBASApp w;
      w.show();
    }
    return a.exec();
}
